package qinggui.mlz.module.startagrelation.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import qinggui.mlz.module.startagrelation.entity.StarTagRelation;

import java.util.List;

@Mapper
public interface StarTagRelationMapper{

    @Select("select * from star_tag_relation where star_id = #{starId} and tag_id = #{tagId}")
    List<StarTagRelation> queryByStarIdAndTagId(@Param("starId") Long starId, @Param("tagId") Long tagId);

    @Insert("insert into star_tag_relation (star_id,tag_id,create_time,update_time,is_deleted) values (#{starTagRelation.starId},#{starTagRelation.tagId},#{starTagRelation.createTime},#{starTagRelation.updateTime},#{starTagRelation.isDeleted})")
    Integer instarTagRelation(@Param("starTagRelation") StarTagRelation starTagRelation);
}
